// 尚硅谷服务器
import request from "./axios";
// 本地服务器
import mockRequest from "./mockAxios";
// // 本地服务器登录
// export const login = (data) =>
//   mockRequest({
//     url: "/login",
//     method: "post",
//     data,
//   });
// 获取it页首次加载数据
// export const reqItPageData = () => mockRequest({
//     url:'/itmoudel/detailInfo',
//     method: 'GET',
// })
export const reqITDataList = (type) => {
  return mockRequest({
    url: "/itmoudel/detailInfo",
    method: "GET",
    params: {
      type,
    },
  });
};
// 获取it页导航列表
export const reqNavListData = () =>
  mockRequest({
    url: "/itmoudel/navlist",
    method: "GET",
  });
// 获取验证码
export const reqGetCode = (phone) =>
  request({
    url: `/user/passport/sendCode/${phone}`,
    method: "get",
  });
// 注册新用户
export const reqUserRegister = (data) =>
  request({
    url: "/user/passport/register",
    method: "post",
    data,
  });
// 登录操作
export const reqUserLogin = (data) =>
  request({
    url: "/user/passport/login",
    method: "post",
    data,
  });
// 获取用户信息
export const reqUserInfo = () =>
  request({
    url: "/user/passport/auth/getUserInfo",
    method: "get",
  });
// 退出登录
export const reqLogOut = () =>
  request({
    url: "/user/passport/logout",
    method: "get",
  });
// 获取首页数据
export const reqGetIndex = () => mockRequest.get("/");
